]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Avoid stealing focus from other entries into overview entry
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 9 Feb 2018 23:18:26 +0000 (00:18 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Sat, 10 Feb 2018 00:03:11 +0000 (00:03 +0000)
The captured-event handler just redirects focus there on the first keypress,
what it doesn't account for is that other entries may be active while the
Activities overview is opened (eg. alt-f2, or other modal dialogs). Play
along with other entries, and make it only steal focus if no other entry
is selected.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/33

Closes: #33
js/ui/viewSelector.js

index d9a13a3aa372554582b402996a01bf20cd4197a7..aba703bc41d90239091d149bf2640cd5d3524708 100644 (file)
@@ -606,7 +606,7 @@ var ViewSelector = new Lang.Class({
                 // - cancel the search
                 this.reset();
             }
-        } else if (!this._text.has_key_focus() &&
+        } else if (!(global.stage.get_key_focus() instanceof Clutter.Text) &&
                    (event.type() == Clutter.EventType.KEY_PRESS ||
                     event.type() == Clutter.EventType.KEY_RELEASE)) {
             let unichar = event.get_key_unicode();